package deletedelete;

import java.io.*;

public class IO33 {
    public static void main(String[] args) throws IOException {

        /*
        2、分别使用FileOutputStream/FileWriter输出流，向"E:/output" 输出一句话"hello world"，
并能通过FileInputStream/FileReader输入流读出这段文字。
        */

        FileOutputStream out=new FileOutputStream("E:/output.txt");
        out.write("hello world!!!".getBytes());

        FileInputStream in=new FileInputStream("E:/output.txt");
        int len;
        byte[] bytes=new byte[14];
        while ((len= in.read(bytes))!=-1){
            System.out.println("文件已经存在");
            System.out.println(new String(bytes));
        }


        in.close();
        out.close();




    }
}
